Special Programming Information
*******************************
This information is intended for advanced programmers writing applications or
drivers to make use of the extended capabilities of the Paradise* VGA 
Plus 16* Card. This information is not needed for normal use of the 
Paradise VGA Plus 16 Card. Use of the information contained here requires 
familiarity with assembly language programming and the workings of the IBM* 
PC/AT* environments.

Programmers requiring additional general information on programming VGA may
want to refer to the IBM PS/2 Technical Reference manuals as well as the
following book: 
Programmer's Guide to PC and PS/2 Video Systems,
by Richard Wilton, Microsoft Press, 1987. (ISBN 1-55615-103-9). 

Programming Considerations
**************************
Refer to the Extended Video Mode table in the VGA Plus 16 Card Software
Manual for a description of the extended video modes available on your VGA
Plus 16 Card.

132 Column Modes hex 54,55,56,57
********************************
If the multi-frequency monitor switch (sw 1) is turned on, the BIOS will use 
the 8x8 font for the 43 row modes (54,56) and the 8x16 font for the 25 row
modes (55,57) and program the PVGA chip to use all 8 pixels. If on the other
hand, the multi-frequency monitor switch is off, the PVGA chip will be limited
to 7 pixels causing the 8x8 and 8x16 characters to run together. The VGAPROF
utility compensates for this by loading a different font when the 132 column
modes are selected and the multi-frequency monitor switch is off. For those
programs that set the 132 column modes, the fonts used by the VGAPROF utility
are provided on this disk:

      FONT_25.I   ---- Mode 55 and 57.
      FONT_43.I   ---- Mode 54 and 56.

The following program segment demonstrates how to determine if the fonts
should be used.

Read the Paradise Register 5 (3ce index f):

        mov     ax,007fh                ; Use extended setmode     
        mov     bh,1fh                  ; Look in the pr5 switches
        int     10h
        test    bl,80H                  ; Look for the switch 1 = on
        jne     quit                    ; Switch is off do nothing

The switch was on. Pick the font needed based on the mode. 

        mov     ax,offset f5x7          ; load address of font for mode 54,56
        mov     bh,9                    ; Load number of points
                
        mov     ax,offset f7x16         ; load address of font for mode 55,57
        mov     bh,16                   ; Set points             

 Setup for loading the font via BIOS call 11.

        push    cs                      ; put cs in es
        pop     es
        push    ax                      ; Contains the offset
        pop     bp
        mov     al,00h                  ; Load user font
        mov     ah,11h                  ; set bios call lcgen    
        mov     bl,00h                  ; Starting block         
        mov     cx,256                  ; number of characters
        xor     dx,dx
        int     10h

Extended 800x600 Graphics Modes hex 58,59
*****************************************
800 by 600 extended graphics modes require a multi-frequency monitor. No 
checking is done in the BIOS or hardware to determine if such a monitor is
connected.  This mode is available independent of the setting of the 
multi-frequency monitor special timing switch (switch lever 1).

Extended 256 Color Graphics Modes hex 5E
****************************************
The 640 by 400 extended graphics mode of the VGA Plus 16 Card can be invoked
using the SetMode BIOS call.  The file 256COLOR.TXT on this disk describes in
detail how to access the additional memory required for this extended mode.

Extended BIOS Calls
Setmode Extensions
******************
The extended video modes of the Paradise VGA Plus 16 Card can be set via
the standard SETMODE BIOS call or through the SET SPECIAL MODE BIOS call.
Additionally support is provided for setting and locking non-VGA modes
and reading and writing the Paradise Registers through the EXTENDED
FUNCTIONS Setmode BIOS call.

Setmode (BIOS call AH=00) has been extended as follows:

    AH = 00h    SETMODE
        AL = extended video mode
            This call will set the extended Paradise VGA Plus 16 Card
            video modes:
            54h, 55h, 56h, 57h, 58h, 59h, 5Eh.

    AX = 007E   SET SPECIAL MODE 
                   This call sets modes by describing the mode desired.

       BX = The horizontal dimension of the mode desired
            (in pixels for graphics modes, columns for alpha modes) 
       CX = The vertical dimension of the mode desired
            (in pixels for graphics modes, rows for alpha modes)
       DX = The number of colors of the mode desired
            (use 0 for monochrome modes)

    On exit, the BH register will equal 7E if successful.


    AX = 007F   EXTENDED FUNCTIONS
           This call supports the following functions:        

       BH = 00  SET VGA OPERATION

       BH = 01  SET NON-VGA OPERATION
           Board must be set to a valid mode for non-VGA operation.
           Color modes (0,1,2,3,4,5,6) will set non-VGA CGA operation.
           Monochrome mode 7 will set non-VGA MDA/Hercules operation.

       BH = 02  QUERY MODE STATUS 

           On exit the following is returned:

                  BL = 0 if operating in VGA mode.
                  BL = 1 if operating in non-VGA mode
                  CH = Total video RAM size in 64k byte units.
                  CL = Video RAM used by the current mode.

       BH = 03  LOCKS CURRENT MODE
           Allows current mode (VGA or non-VGA) to survive re-boot.
 
    Paradise Register Extended Function Calls
       BH = 09  WRITE PARADISE REGISTER 0A (3ce index 9)
           BL = Value to set in the paradise register.          

       BH = 0A  WRITE PARADISE REGISTER 0B (3ce index A)
           BL = Value to set in the paradise register.

       BH = 0B  WRITE PARADISE REGISTER 1 (3ce index B)
           BL = Value to set in the paradise register.

       BH = 0C  WRITE PARADISE REGISTER 2 (3ce index C)
           BL = Value to set in the paradise register.

       BH = 0D  WRITE PARADISE REGISTER 3 (3ce index D)
           BL = Value to set in the paradise register.

       BH = 0E  WRITE PARADISE REGISTER 4 (3ce index E)
           BL = Value to set in the paradise register.


       BH = 19  READ PARADISE REGISTER 0A (3ce index 9)

           On exit the following is returned:

               BL = Value of the paradise register.


       BH = 1A  READ PARADISE REGISTER 0B (3ce index A)

           On exit the following is returned:

               BL = Value of the paradise register.

       BH = 1B  READ PARADISE REGISTER 1 (3ce index B)

           On exit the following is returned:

               BL = Value of the paradise register.

       BH = 1C  READ PARADISE REGISTER 2 (3ce index C)

           On exit the following is returned:

               BL = Value of the paradise register.

       BH = 1D  READ PARADISE REGISTER 3 (3ce index D)

           On exit the following is returned:

               BL = Value of the paradise register.

       BH = 1E  READ PARADISE REGISTER 4 (3ce index E)

           On exit the following is returned:

               BL = Value of the paradise register.

       BH = 1F  READ PARADISE REGISTER 5 (3ce index F)

           On exit the following is returned:

               BL = Value of the paradise register.

    On exit, the BH register will equal 7F if successful.

Note: The state of Paradise Registers cannot be assumed between standard 
Setmode calls, and should not be assumed in general.

(C) 1988 Paradise Systems, Inc. All rights reserved.
* Paradise and VGA Plus 16 are trademarks of Paradise Systems, Inc.
* IBM and AT are trademarks of International Business Machines Corp.